//
//  SudokuViewController.h
//  Sudoku
//
//  Created by iMac-hxsd on 12-2-6.
//  Copyright 2012年 __MyCompanyName__. All rights reserved.
//

@interface SudokuViewController : UIViewController
{
    UIControl *menuViewControl;
    
    IBOutlet UIScrollView *scrollView;
    
	// 数独数据
	NSDictionary *sudokuTable;
	// 正确答案
	NSDictionary *sudokuTableCorrect;
	// 不可编辑的按钮
	NSDictionary *doNotEditNumButtons;
    
	UIButton *activedButton;
	UIButton *lastActivedButton;
    
	// 选中的按钮TAG
	int activedButtonTag;
    
	// 是否可能数值模式
	BOOL isPosibleValueMode;    
}


@property (nonatomic, retain) UIControl *menuViewControl;
@property (nonatomic, retain) UIScrollView *scrollView;

@property (nonatomic, assign) NSDictionary *sudokuTable;
@property (nonatomic, assign) NSDictionary *sudokuTableCorrect;
@property (nonatomic, assign) NSDictionary *doNotEditNumButtons;

@property (nonatomic, retain) UIButton *activedButton;
@property (nonatomic, retain) UIButton *lastActivedButton;

@property (nonatomic, assign) int activedButtonTag;

@property (nonatomic, assign) BOOL isPosibleValueMode;


// 菜单视图
- (void) menuView;

// 开始游戏
- (void) playGame;

// 完成游戏
- (void) completeGame;

// 初始化数独
- (void) sudokuInit;

// 选中按钮
- (IBAction) numButtonPressed : (UIButton *) sender;

// 可能数值模式按钮点击
- (IBAction) posibleValueMedeButtonPressed : (UIButton *) sender;

// 清空可能数值
- (void) posibleValueClear : (id) sender;

// 按钮高亮
- (void) answerButtonLight : (UIButton *) sender;

// 可能数值模式数值高亮
- (void) answerPosibleValueButtonLight: (id) sender;

// 所有按钮清除高亮
- (void) answerAllButtonClearLight;
@end
